[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
$] The string printed out when you say "perl -v". It
can be used to determine at the beginning of a
script whether the perl interpreter executing the
script is in the right range of versions. If used
in a numeric context, returns the version +
patchlevel / 1000. Example:
# see if getc is available
($version,$patchlevel) =
$] =~ /(\d+\.\d+).*\nPatch level: (\d+)/;
print STDERR "(No filename completion available.)\n"
if $version * 1000 + $patchlevel < 2016;
or, used numerically,
warn "No checksumming!\n" if $] < 3.019;
(Mnemonic: Is this version of perl in the right
bracket?)
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson